package com.itheima.thread;

/**
 * @author wz
 * @company 公司
 * @create 2020-03-05 10:21
 */
public class Demo3CreateThread {
    public static void main(String[] args) {
        new Thread(new Runnable() {
            public void run() {
                String name = Thread.currentThread().getName();
                for (int i = 0; i < 5; i++) {
                    System.out.println(name+"内容是:"+i);
                }
            }
        }).start();

        new Thread(new Runnable() {
            public void run() {
                String name = Thread.currentThread().getName();
                for (int i = 0; i < 5; i++) {
                    System.out.println(name+"内容是:"+i);
                }
            }
        }).start();
    }
}
